import type {
  RoleQueryListParams,
  RoleSaveOrUpdateParams,
} from '@/types'
import { PAGING } from '@/constant'

export const defaultRoleForm: RoleSaveOrUpdateParams = {
  roleName: '',
}

export const rules = {
  roleName: [
    {
      required: true,
      message: '角色名称不能为空！',
      trigger: 'blur',
    },
  ],
  bindApplyId: [
    {
      required: true,
      message: '应用资源不能为空！',
      trigger: 'blur',
    },
  ],
  power: [
    {
      required: true,
      message: '必填项！',
      trigger: 'blur',
    },
  ],
}

export const defaultPagingParams: RoleQueryListParams = {
  ...PAGING.PARAMS,
  roleName: '',
}
